package top.zsyle.org.domain;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import top.zsyle.basic.domain.BaseDomain;

import java.util.ArrayList;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Department extends BaseDomain {

    private String sn;
    private String name;
    private String dirPath;
    private Integer state;
    private Long managerId;
    private Long parentId;
    private Long shopId;

    //部门负责人
    private Employee manager;
    //上级部门
    private Department parent;
    //无限级树
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<Department> children = new ArrayList<>();
}
